package com.dhcc.rarp.entity.appointment;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

import lombok.Data;

@Entity
@Table(name="t_appointment")
@Data
public class Appointment  implements java.io.Serializable{

	private static final long serialVersionUID = -3173798160691098316L;

	@Id
	@GenericGenerator(name = "uuidGenerator", strategy = "uuid")
	@GeneratedValue(generator = "uuidGenerator")
	@Column(name="APP_ID")
	private String appId;//预约挂号类ID

	@Column(name="ADM_ADDRESS")
	private String admAddress;//候诊地址

	@Column(name="ADM_QUEUE_NO")
	private String admQueueNo;//就诊队列号

	@Column(name="ADM_TIME_RANGE")
	private String admTimeRange;//候诊时间范围

	@Column(name="APP_STATUS")
	private String appStatus;//申请单状态

	@Column(name="APPLICATION_ID")
	private String applicationId;//继承的申请单类ID

	@Column(name="APPLICATION_NO")
	private String applicationNo;//申请单号

	@Column(name="APPLICATION_ORG_CODE")
	private String applicationOrgCode;//申请机构代码

	@Temporal(TemporalType.DATE)
	@Column(name="APPOINTMENT_DATE")
	private Date appointmentDate;//申请单预约日期

	@Column(name="APPOINTMENT_ORG_CODE")
	private String appointmentOrgCode;//申请单预约机构代码

	@Column(name="BOOK_MODE")
	private String bookMode;//预约模式

	@Temporal(TemporalType.DATE)
	@Column(name="CANCEL_DATE")
	private Date cancelDate;//取消日期

	@Column(name="CANCEL_USER_ID")
	private String cancelUserId;//取消用户ID

	@Column(name="CARD_TYPE")
	private String cardType;//卡类型

	@Column(name="CARD_VALUE")
	private String cardValue;//卡号

	@Column(name="CLIENT_TYPE_ID")
	private String clientTypeId;//预约的客户端类型

	@Temporal(TemporalType.DATE)
	@Column(name="CREATE_TIME")
	private Date createTime;//数据创建时间

	@Column(name="CREATE_USER_DR")
	private String createUserDr;//数据创建用户ID

	@Column(name="DST_ID")
	private String dstId;//排班分时段类ID

	@Column(name="HIS_APP_ID")
	private String hisAppId;//HIS系统预约ID

	@Column(name="ID_CARD_TYPE")
	private String idCardType;//身份证件类别

	@Column(name="ID_CARD_VALUE")
	private String idCardValue;//身份证件号码

	@Column(name="IDENTITY_CARD_VALUE")
	private String identityCardValue;//身份证号码

	@Column(name="LOCK_QUEUE_NO")
	private String lockQueueNo;//锁号
	
	@Column(name="mobilephone")
	private String mobilephone;//手机号码
	
	@Column(name="name")
	private String name;//人员姓名

	@Temporal(TemporalType.DATE)
	@Column(name="NOTIFY_DATETIME")
	private Date notifyDatetime;//停诊通知时间

	@Column(name="NOTIFY_FLAG")
	private String notifyFlag;//停诊通知标志

	@Column(name="NOTIFY_USER")
	private String notifyUser;//停诊通知用户

	@Column(name="PATIENT_ID")
	private String patientId;//挂号人员

	@Column(name="PAY_FLAG")
	private String payFlag;//支付标记

	@Column(name="SCHEDULE_ID")
	private String scheduleId;//医生排班类ID

	@Column(name="STOP_AUTOREFUND_FLAG")
	private String stopAutorefundFlag;//停诊后同意自动退号标志

	@Column(name="TO_ADM_FLAG")
	private String toAdmFlag;//就诊标志

	@Column(name="TO_HIS_FLAG")
	private String toHisFlag;//预约记录同步到HIS系统标志

	@Column(name="TOTAL_FEE")
	private BigDecimal totalFee;//总费用
	
	@Column(name="APPNOTE")
	private String appnote;//备注

	@Column(name="REPLACE_FLAG")
	private String replaceFlag;
	
	@Column(name="check_id_card")
	private String checkIdCard;				//主账户和子账户来源
	
	@Column(name="app_fee")
	private BigDecimal appFee;				//挂号费
	
	@Column(name="diagnosis_fee")
	private BigDecimal diagnosisFee;				//诊疗费
	
	@Column(name="receivable_fee")
	private BigDecimal receivableFee;				//应收金额
	
	//由于合肥，排班数据没有在市平台，所以需要保存这些基础字段
	@Column(name="org_code")
	private String orgCode;                         	//机构ID
	
	@Column(name="org_name")
	private String orgName;                         	//机构名称
	
	@Column(name="depart_no")
	private String departNo;                       		//科室ID
	
	@Column(name="depart_name")
	private String departName;   					//部门名称
	
	@Column(name="staff_no")
	private String staffNo;   					//医生编码
	
	@Column(name="staff_name")
	private String staffName; 							//医生名称
	
	@Column(name="project_origin")
	private String projectOrigin;//项目来源
	
	@Column(name="schedule_origin")
	private String scheduleOrigin;//排班来源
	
	@Column(name="daypart_id")
	private String daypartId;//排班时段
	
	@Column(name="schedule_status")
	private String scheduleStatus;//排班状态
	
	@Column(name="NUMID")
	private String numId;//挂号记录内码
	@Column(name="user_id")
	private String userId;//用户id
	@Column(name="STOP_REASON")
	private String stopReason;//停诊原因
	@Column(name="REPLACE_SCHEDULEID")
	private String replaceScheduleId;//替诊排班id
	@Column(name="REPLACE_DOCTOR_NAME")
	private String replaceDoctorNames;//替诊医生
	
	/*支付相关参数*/
	@Temporal(TemporalType.DATE)
	@Column(name="pay_date")
	private Date payDate;//交易完成时间yyyyMMdd
	
	@Column(name="pay_channel")
	private String  payChannel;//支付渠道
	@Column(name="pay_order_no")
	private String payOrderNo;//支付订单号
	@Column(name="pay_app_id")
	private String payAppId;//商户号
	@Column(name="pay_submer_no")
	private String paySubmerNo;//子商户号
	/*退款参数*/
	@Column(name="refund_no")
	private String refundNo;//	退款订单号
	
	@Temporal(TemporalType.DATE)
	@Column(name="refund_date")
	private Date refundDate;//	退款时间
	
	@Column(name="refund_amount")
	private String refundAmount;//	退款金额
	@Column(name="refund_reason")
	private String refundReason;//	退款原因
	@Column(name="refund_type")
	private String refundType;//退款类型online：联机单笔退款 batch:批量退款(目前不支持)
	/*锁号id*/
	@Column(name="dsl_id")
	private String dslId;//锁号id
//	@Column(name="org_type")
//	private String orgType="01";//院区

	
}
